<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
	<head>
		<link rel="stylesheet" href="style.css" />
		<link rel="stylesheet" type="text/css" href="/site_media/css/base.css" />
		<link rel="stylesheet" type="text/css" href="/site_media/css/form.css"/>

		<link rel="stylesheet" type="text/css" href="/site_media/css/ddlevelsmenu-base.css" />
		<link rel="stylesheet" type="text/css" href="/site_media/css/ddlevelsmenu-topbar.css" />
		<link rel="stylesheet" type="text/css" href="/site_media/css/ddlevelsmenu-sidebar.css" />

		<script type="text/javascript" src="/site_media/js/ddlevelsmenu.js"></script>
		<script type="text/javascript" src="/site_media/js/util.js"></script>
		{% block js %}{% endblock %}
		<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<title> UNCLE {% block title %}  {% endblock %}</title>
	</head>
	<body id="container" {% block onload %}{% endblock %}>

		{% if user.is_authenticated %}
		<div style="position:absolute; top:50px; left:490px;">
			Welcome, <a href="/user/edit/"><button>{{ user.username }}</button></a>
			{% if perms.users.is_artist %}
			<a href="/user/requests/">
				<button>{% load zdy_filter %} ({{user.id|count_up_req}})</button>
			</a>
			{% else %}
			{% if perms.users.is_client %}
			<a href="/user/basket/"><img src="/site_media/img/basket.png" height="29px"/> </a>			
			{% endif %}
			{% endif %}

			<a href="/logout/"><img src="/site_media/img/logout.gif"/>  Log out</a>
		</div>
		{% else %}
		<div id="usr" style="position:absolute; top:50px; left:550px;">
			<a href="/accounts/login/"><img src="/site_media/img/people.gif"/>  Log in </a>
			<a href="/user/register/"><img src="/site_media/img/admin.gif"/>  Register </a>
		</div>
		{% endif %}

		<div style="position:absolute;top:20px;">
			<div id="ddtopmenubar" class="mattblackmenu" >
				<ul>
					{% if perms.users.is_producer %}
					<li><a href="/user/search/cats/" rel="ddsearch">Search</a></li>
					<li><a href="/project/all" rel="project">All Project</a></li>
					<li><a href="/other/" rel="other">Other</a></li>
					{% endif %}					
				</ul>
			</div>

			<script type="text/javascript">
				ddlevelsmenu.setup("ddtopmenubar", "topbar")
			</script>
			<ul id="ddsearch" class="ddsubmenustyle">
				<li><a href="/user/search/abc/">Alphabetical</a></li>
				<li><a href="/user/search/cats/">Categories & Skills</a></li>
				<li><a href="/user/search/">Wild Search</a></li>
				{% if user.username == 'kth' %}
				<li><a href="/pwds/">Specific Skills</a></li>
				{% endif %}
			</ul>
			<ul id="project" class="ddsubmenustyle">
				{% if perms.users.is_producer %}
				<li><a href="/project/new/">New project</a></li>
				{% endif %}
				<li><a href="/project/search/">Search project</a></li>
			</ul>
			<ul id="other" class="ddsubmenustyle">
				<li><a href="/user/password/">Change password</a></li>
				{% if perms.users.is_producer %}
				<li><a href="/user/updates/">Updates</a></li>				
				{% endif %}
				{% if perms.users.is_artist %}
				<li><a href="/user/upload/">My videos</a></li>
				{% endif %}				
			</ul>
		</div>

		<div style="position:absolute;top:5px;right:5px;">
			<a href="/about/">
				<img src="/site_media/img/logo.png" height="40"/>
			</a>
		</div>

		<div class="" style="">
			<p>
				{% if messages %}
				{% for message in messages %}
				<span style="color:red;">Message: {{ message }}</span><br/>
				{% endfor %}
				{% endif %}
			</p>
		</div>

		<div id="content" style="position:absolute;top:60px;left:20px;">
			{% block content %}{% endblock %}
		</div>
	</body>
</html>